<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<sec:authentication property="principal" var="currentPrincipal" scope="page" />

<div class="modal-dialog umu-modal-dialog" style="margin-top:50px;">
	<div class="modal-content">

		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal">
        <span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
      </button>
			<h4 class="modal-title">设置期数时间</h4>
		</div>

		<form class="form-horizontal umu-form modal-search-form" role="form" method="POST" action="${ctx.host}/project-data/${id}/phases" data-validate="true">
			<input type="hidden" name="_method" value="PATCH" />

			<div class="modal-body">

				<!--		<div class="form-group  umu-form-group">
					<label class="control-label col-xs-3">第一期时间：</label>
					<div class="col-xs-8">
						<input type="text" class="form-control" name="beginDate" value="" placeholder="开始时间"  autocomplete="off"  />~
						<input type="text" class="form-control" name="endDate" value="" placeholder="结束时间"  autocomplete="off"  />
					</div>
				</div>

				<div class="form-group  umu-form-group">
					<label class="control-label col-xs-3">第二期时间：</label>
					<div class="col-xs-8">
						<input type="text" class="form-control" name="beginDate" value="" placeholder="开始时间"  autocomplete="off"  />~
						<input type="text" class="form-control" name="endDate" value="" placeholder="结束时间"  autocomplete="off"  />
					</div>
				</div>-->
				<c:forEach items="${projectPhases}" var="projectPhases" varStatus="status">
					<div class="form-group  umu-form-group">
						<label class="control-label col-xs-3">第${status.index+1}期时间：</label>
						<div class="col-xs-8 common-date">
							<input type="hidden" value="${projectPhases.phase}" />
							<input type="text" class="form-control date" name="beginDate" value="${projectPhases.beginDate}" placeholder="开始时间" autocomplete="off" />~
							<input type="text" class="form-control date" name="endDate" value="${projectPhases.endDate}" placeholder="结束时间" autocomplete="off" />
						</div>
					</div>
				</c:forEach>

			</div>

			<div class="modal-footer">
				<button type="submit" class="btn btn-shadow-success btn-shadow umu-btn">确定</button>
				<button type="button" class="btn btn-shadow-default btn-shadow umu-btn" data-dismiss="modal">取消</button>
			</div>

		</form>

	</div>
</div>